﻿using Model.BusinessModel.OutPut;
using Model.BusinessModel.OutPut.sys;
using Model.DomainModel.Sys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.IRepository.Sys
{
    /// <summary>
    /// 公司仓储接口
    /// </summary>
    public interface ISysCorporationRepository : IRepository<SysCorporation>
    {
        /// <summary>
        /// 获取所有公司数据
        /// </summary>
        /// <param name="corporationKey">公司key</param>
        /// <returns>返回所有公司数据</returns>
        List<SysCorporationOutPut> GetAllCorporation(string? corporationKey, string? authWhere = null);

        /// <summary>
        /// 获取公司下的系统
        /// </summary>
        /// <returns>返回公司下的项目系统</returns>
        List<TreeOutPut> GetCorporationSystemList();

        /// <summary>
        /// 根据公司名称和编码，获取公司数据
        /// </summary>
        /// <param name="name">公司名称</param>
        /// <param name="code">公司编码</param>
        /// <returns>返回指定数据</returns>
        List<SysCorporationOutPut> GetCorporationMsg(string? name, string? code);

        /// <summary>
        /// 根据编码，获取公司数据
        /// </summary>
        /// <param name="code">公司编码</param>
        /// <returns>返回指定数据</returns>
        SysCorporationOutPut GetCorporationByCodeMsg(string code);

        /// <summary>
        /// 设置公司是否启用
        /// </summary>
        /// <param name="corporationKeys">公司key集合</param>
        /// <param name="isOpen">是否启用</param>
        void SetCorporationIsOpen(List<string> corporationKeys, bool isOpen);
    }
}
